3.3.51 \(\int \cos ^2(e+f x) (a+b \sec ^2(e+f x))^{3/2} \, dx\) [251]

Optimal. Leaf size=124 \[ \frac {\sqrt {a} (a+3 b) \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+b+b \tan ^2(e+f x)}}\right )}{2 f}+\frac {b^{3/2} \tanh ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b+b \tan ^2(e+f x)}}\right )}{f}+\frac {a \cos (e+f x) \sin (e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{2 f} \]

[Out]

b^(3/2)*arctanh(b^(1/2)*tan(f*x+e)/(a+b+b*tan(f*x+e)^2)^(1/2))/f+1/2*(a+3*b)*arctan(a^(1/2)*tan(f*x+e)/(a+b+b*
tan(f*x+e)^2)^(1/2))*a^(1/2)/f+1/2*a*cos(f*x+e)*sin(f*x+e)*(a+b+b*tan(f*x+e)^2)^(1/2)/f

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {4231, 424, 537, 223, 212, 385, 209} \begin {gather*} \frac {\sqrt {a} (a+3 b) \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)+b}}\right )}{2 f}+\frac {b^{3/2} \tanh ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)+b}}\right )}{f}+\frac {a \sin (e+f x) \cos (e+f x) \sqrt {a+b \tan ^2(e+f x)+b}}{2 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]^2*(a + b*Sec[e + f*x]^2)^(3/2),x]

[Out]

(Sqrt[a]*(a + 3*b)*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + b + b*Tan[e + f*x]^2]])/(2*f) + (b^(3/2)*ArcTanh[(Sq
rt[b]*Tan[e + f*x])/Sqrt[a + b + b*Tan[e + f*x]^2]])/f + (a*Cos[e + f*x]*Sin[e + f*x]*Sqrt[a + b + b*Tan[e + f
*x]^2])/(2*f)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 424

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(a*d - c*b)*x*(a + b*x^n)^(
p + 1)*((c + d*x^n)^(q - 1)/(a*b*n*(p + 1))), x] - Dist[1/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)
^(q - 2)*Simp[c*(a*d - c*b*(n*(p + 1) + 1)) + d*(a*d*(n*(q - 1) + 1) - b*c*(n*(p + q) + 1))*x^n, x], x], x] /;
 FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, n, p, q
, x]

Rule 537

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*Sqrt[(c_) + (d_.)*(x_)^(n_)]), x_Symbol] :> Dist[f/b, I
nt[1/Sqrt[c + d*x^n], x], x] + Dist[(b*e - a*f)/b, Int[1/((a + b*x^n)*Sqrt[c + d*x^n]), x], x] /; FreeQ[{a, b,
 c, d, e, f, n}, x]

Rule 4231

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fre
eFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 + ff^2*x^2)^(m/2 - 1)*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/
2), x]^p, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && IntegerQ[n/2]

Rubi steps

\begin {align*} \int \cos ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a+b+b x^2\right )^{3/2}}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a \cos (e+f x) \sin (e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{2 f}+\frac {\text {Subst}\left (\int \frac {(a+b) (a+2 b)+2 b^2 x^2}{\left (1+x^2\right ) \sqrt {a+b+b x^2}} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=\frac {a \cos (e+f x) \sin (e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{2 f}+\frac {b^2 \text {Subst}\left (\int \frac {1}{\sqrt {a+b+b x^2}} \, dx,x,\tan (e+f x)\right )}{f}+\frac {(a (a+3 b)) \text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b+b x^2}} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=\frac {a \cos (e+f x) \sin (e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{2 f}+\frac {b^2 \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {\tan (e+f x)}{\sqrt {a+b+b \tan ^2(e+f x)}}\right )}{f}+\frac {(a (a+3 b)) \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,\frac {\tan (e+f x)}{\sqrt {a+b+b \tan ^2(e+f x)}}\right )}{2 f}\\ &=\frac {\sqrt {a} (a+3 b) \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+b+b \tan ^2(e+f x)}}\right )}{2 f}+\frac {b^{3/2} \tanh ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b+b \tan ^2(e+f x)}}\right )}{f}+\frac {a \cos (e+f x) \sin (e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 7.65, size = 466, normalized size = 3.76 \begin {gather*} \frac {e^{-i (e+f x)} \sqrt {4 b+a e^{-2 i (e+f x)} \left (1+e^{2 i (e+f x)}\right )^2} \cos ^3(e+f x) \left (-i a \left (-1+e^{2 i (e+f x)}\right )+\frac {2 e^{2 i (e+f x)} \left (2 a^{3/2} f x+6 \sqrt {a} b f x-i \sqrt {a} (a+3 b) \log \left (e^{-2 i e} \left (a+2 b+a e^{2 i (e+f x)}+\sqrt {a} \sqrt {4 b e^{2 i (e+f x)}+a \left (1+e^{2 i (e+f x)}\right )^2}\right )\right )+i \sqrt {a} (a+3 b) \log \left (e^{-2 i e} \left (a+a e^{2 i (e+f x)}+2 b e^{2 i (e+f x)}+\sqrt {a} \sqrt {4 b e^{2 i (e+f x)}+a \left (1+e^{2 i (e+f x)}\right )^2}\right )\right )-4 b^{3/2} \log \left (-\frac {e^{3 i e} \left (\sqrt {b} \left (-1+e^{2 i (e+f x)}\right )-i \sqrt {4 b e^{2 i (e+f x)}+a \left (1+e^{2 i (e+f x)}\right )^2}\right ) f}{2 b^2 \left (1+e^{2 i (e+f x)}\right )}\right )\right )}{\sqrt {4 b e^{2 i (e+f x)}+a \left (1+e^{2 i (e+f x)}\right )^2}}\right ) \left (a+b \sec ^2(e+f x)\right )^{3/2}}{2 \sqrt {2} f (a+2 b+a \cos (2 e+2 f x))^{3/2}} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[Cos[e + f*x]^2*(a + b*Sec[e + f*x]^2)^(3/2),x]

[Out]

(Sqrt[4*b + (a*(1 + E^((2*I)*(e + f*x)))^2)/E^((2*I)*(e + f*x))]*Cos[e + f*x]^3*((-I)*a*(-1 + E^((2*I)*(e + f*
x))) + (2*E^((2*I)*(e + f*x))*(2*a^(3/2)*f*x + 6*Sqrt[a]*b*f*x - I*Sqrt[a]*(a + 3*b)*Log[(a + 2*b + a*E^((2*I)
*(e + f*x)) + Sqrt[a]*Sqrt[4*b*E^((2*I)*(e + f*x)) + a*(1 + E^((2*I)*(e + f*x)))^2])/E^((2*I)*e)] + I*Sqrt[a]*
(a + 3*b)*Log[(a + a*E^((2*I)*(e + f*x)) + 2*b*E^((2*I)*(e + f*x)) + Sqrt[a]*Sqrt[4*b*E^((2*I)*(e + f*x)) + a*
(1 + E^((2*I)*(e + f*x)))^2])/E^((2*I)*e)] - 4*b^(3/2)*Log[-1/2*(E^((3*I)*e)*(Sqrt[b]*(-1 + E^((2*I)*(e + f*x)
)) - I*Sqrt[4*b*E^((2*I)*(e + f*x)) + a*(1 + E^((2*I)*(e + f*x)))^2])*f)/(b^2*(1 + E^((2*I)*(e + f*x))))]))/Sq
rt[4*b*E^((2*I)*(e + f*x)) + a*(1 + E^((2*I)*(e + f*x)))^2])*(a + b*Sec[e + f*x]^2)^(3/2))/(2*Sqrt[2]*E^(I*(e
+ f*x))*f*(a + 2*b + a*Cos[2*e + 2*f*x])^(3/2))

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.15, size = 1511, normalized size = 12.19

method result size
default \(\text {Expression too large to display}\) \(1511\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)^2*(a+b*sec(f*x+e)^2)^(3/2),x,method=_RETURNVERBOSE)

[Out]

-1/2/f*sin(f*x+e)*(2^(1/2)*((I*cos(f*x+e)*a^(1/2)*b^(1/2)-I*a^(1/2)*b^(1/2)+cos(f*x+e)*a+b)/(1+cos(f*x+e))/(a+
b))^(1/2)*(-2*(I*cos(f*x+e)*a^(1/2)*b^(1/2)-I*a^(1/2)*b^(1/2)-cos(f*x+e)*a-b)/(1+cos(f*x+e))/(a+b))^(1/2)*Elli
pticF((cos(f*x+e)-1)*((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)/sin(f*x+e),(-(4*I*a^(3/2)*b^(1/2)-4*I*a^(1/2)*b^(
3/2)-a^2+6*a*b-b^2)/(a+b)^2)^(1/2))*a^2*sin(f*x+e)+3*2^(1/2)*((I*cos(f*x+e)*a^(1/2)*b^(1/2)-I*a^(1/2)*b^(1/2)+
cos(f*x+e)*a+b)/(1+cos(f*x+e))/(a+b))^(1/2)*(-2*(I*cos(f*x+e)*a^(1/2)*b^(1/2)-I*a^(1/2)*b^(1/2)-cos(f*x+e)*a-b
)/(1+cos(f*x+e))/(a+b))^(1/2)*EllipticF((cos(f*x+e)-1)*((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)/sin(f*x+e),(-(4
*I*a^(3/2)*b^(1/2)-4*I*a^(1/2)*b^(3/2)-a^2+6*a*b-b^2)/(a+b)^2)^(1/2))*a*b*sin(f*x+e)+2*2^(1/2)*((I*cos(f*x+e)*
a^(1/2)*b^(1/2)-I*a^(1/2)*b^(1/2)+cos(f*x+e)*a+b)/(1+cos(f*x+e))/(a+b))^(1/2)*(-2*(I*cos(f*x+e)*a^(1/2)*b^(1/2
)-I*a^(1/2)*b^(1/2)-cos(f*x+e)*a-b)/(1+cos(f*x+e))/(a+b))^(1/2)*EllipticF((cos(f*x+e)-1)*((2*I*a^(1/2)*b^(1/2)
+a-b)/(a+b))^(1/2)/sin(f*x+e),(-(4*I*a^(3/2)*b^(1/2)-4*I*a^(1/2)*b^(3/2)-a^2+6*a*b-b^2)/(a+b)^2)^(1/2))*b^2*si
n(f*x+e)-2*2^(1/2)*((I*cos(f*x+e)*a^(1/2)*b^(1/2)-I*a^(1/2)*b^(1/2)+cos(f*x+e)*a+b)/(1+cos(f*x+e))/(a+b))^(1/2
)*(-2*(I*cos(f*x+e)*a^(1/2)*b^(1/2)-I*a^(1/2)*b^(1/2)-cos(f*x+e)*a-b)/(1+cos(f*x+e))/(a+b))^(1/2)*EllipticPi((
cos(f*x+e)-1)*((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)/sin(f*x+e),-1/(2*I*a^(1/2)*b^(1/2)+a-b)*(a+b),(-(2*I*a^(
1/2)*b^(1/2)-a+b)/(a+b))^(1/2)/((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2))*a^2*sin(f*x+e)-6*2^(1/2)*((I*cos(f*x+e
)*a^(1/2)*b^(1/2)-I*a^(1/2)*b^(1/2)+cos(f*x+e)*a+b)/(1+cos(f*x+e))/(a+b))^(1/2)*(-2*(I*cos(f*x+e)*a^(1/2)*b^(1
/2)-I*a^(1/2)*b^(1/2)-cos(f*x+e)*a-b)/(1+cos(f*x+e))/(a+b))^(1/2)*EllipticPi((cos(f*x+e)-1)*((2*I*a^(1/2)*b^(1
/2)+a-b)/(a+b))^(1/2)/sin(f*x+e),-1/(2*I*a^(1/2)*b^(1/2)+a-b)*(a+b),(-(2*I*a^(1/2)*b^(1/2)-a+b)/(a+b))^(1/2)/(
(2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2))*a*b*sin(f*x+e)-4*2^(1/2)*((I*cos(f*x+e)*a^(1/2)*b^(1/2)-I*a^(1/2)*b^(1
/2)+cos(f*x+e)*a+b)/(1+cos(f*x+e))/(a+b))^(1/2)*(-2*(I*cos(f*x+e)*a^(1/2)*b^(1/2)-I*a^(1/2)*b^(1/2)-cos(f*x+e)
*a-b)/(1+cos(f*x+e))/(a+b))^(1/2)*EllipticPi((cos(f*x+e)-1)*((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)/sin(f*x+e)
,1/(2*I*a^(1/2)*b^(1/2)+a-b)*(a+b),(-(2*I*a^(1/2)*b^(1/2)-a+b)/(a+b))^(1/2)/((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^
(1/2))*b^2*sin(f*x+e)-cos(f*x+e)^3*((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)*a^2+cos(f*x+e)^2*((2*I*a^(1/2)*b^(1
/2)+a-b)/(a+b))^(1/2)*a^2-cos(f*x+e)*((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)*a*b+((2*I*a^(1/2)*b^(1/2)+a-b)/(a
+b))^(1/2)*a*b)*cos(f*x+e)^3*((b+a*cos(f*x+e)^2)/cos(f*x+e)^2)^(3/2)/(cos(f*x+e)-1)/(b+a*cos(f*x+e)^2)^2/((2*I
*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^2*(a+b*sec(f*x+e)^2)^(3/2),x, algorithm="maxima")

[Out]

integrate((b*sec(f*x + e)^2 + a)^(3/2)*cos(f*x + e)^2, x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 294 vs. \(2 (113) = 226\).
time = 5.35, size = 1485, normalized size = 11.98 \begin {gather*} \left [\frac {8 \, a \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + \sqrt {-a} {\left (a + 3 \, b\right )} \log \left (128 \, a^{4} \cos \left (f x + e\right )^{8} - 256 \, {\left (a^{4} - a^{3} b\right )} \cos \left (f x + e\right )^{6} + 32 \, {\left (5 \, a^{4} - 14 \, a^{3} b + 5 \, a^{2} b^{2}\right )} \cos \left (f x + e\right )^{4} + a^{4} - 28 \, a^{3} b + 70 \, a^{2} b^{2} - 28 \, a b^{3} + b^{4} - 32 \, {\left (a^{4} - 7 \, a^{3} b + 7 \, a^{2} b^{2} - a b^{3}\right )} \cos \left (f x + e\right )^{2} - 8 \, {\left (16 \, a^{3} \cos \left (f x + e\right )^{7} - 24 \, {\left (a^{3} - a^{2} b\right )} \cos \left (f x + e\right )^{5} + 2 \, {\left (5 \, a^{3} - 14 \, a^{2} b + 5 \, a b^{2}\right )} \cos \left (f x + e\right )^{3} - {\left (a^{3} - 7 \, a^{2} b + 7 \, a b^{2} - b^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \sin \left (f x + e\right )\right ) + 4 \, b^{\frac {3}{2}} \log \left (\frac {{\left (a^{2} - 6 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} + 8 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left ({\left (a - b\right )} \cos \left (f x + e\right )^{3} + 2 \, b \cos \left (f x + e\right )\right )} \sqrt {b} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \sin \left (f x + e\right ) + 8 \, b^{2}}{\cos \left (f x + e\right )^{4}}\right )}{16 \, f}, \frac {8 \, a \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 8 \, \sqrt {-b} b \arctan \left (-\frac {{\left ({\left (a - b\right )} \cos \left (f x + e\right )^{3} + 2 \, b \cos \left (f x + e\right )\right )} \sqrt {-b} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{2 \, {\left (a b \cos \left (f x + e\right )^{2} + b^{2}\right )} \sin \left (f x + e\right )}\right ) + \sqrt {-a} {\left (a + 3 \, b\right )} \log \left (128 \, a^{4} \cos \left (f x + e\right )^{8} - 256 \, {\left (a^{4} - a^{3} b\right )} \cos \left (f x + e\right )^{6} + 32 \, {\left (5 \, a^{4} - 14 \, a^{3} b + 5 \, a^{2} b^{2}\right )} \cos \left (f x + e\right )^{4} + a^{4} - 28 \, a^{3} b + 70 \, a^{2} b^{2} - 28 \, a b^{3} + b^{4} - 32 \, {\left (a^{4} - 7 \, a^{3} b + 7 \, a^{2} b^{2} - a b^{3}\right )} \cos \left (f x + e\right )^{2} - 8 \, {\left (16 \, a^{3} \cos \left (f x + e\right )^{7} - 24 \, {\left (a^{3} - a^{2} b\right )} \cos \left (f x + e\right )^{5} + 2 \, {\left (5 \, a^{3} - 14 \, a^{2} b + 5 \, a b^{2}\right )} \cos \left (f x + e\right )^{3} - {\left (a^{3} - 7 \, a^{2} b + 7 \, a b^{2} - b^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \sin \left (f x + e\right )\right )}{16 \, f}, \frac {4 \, a \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (a + 3 \, b\right )} \sqrt {a} \arctan \left (\frac {{\left (8 \, a^{2} \cos \left (f x + e\right )^{5} - 8 \, {\left (a^{2} - a b\right )} \cos \left (f x + e\right )^{3} + {\left (a^{2} - 6 \, a b + b^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{4 \, {\left (2 \, a^{3} \cos \left (f x + e\right )^{4} - a^{2} b + a b^{2} - {\left (a^{3} - 3 \, a^{2} b\right )} \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}\right ) + 2 \, b^{\frac {3}{2}} \log \left (\frac {{\left (a^{2} - 6 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} + 8 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left ({\left (a - b\right )} \cos \left (f x + e\right )^{3} + 2 \, b \cos \left (f x + e\right )\right )} \sqrt {b} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \sin \left (f x + e\right ) + 8 \, b^{2}}{\cos \left (f x + e\right )^{4}}\right )}{8 \, f}, \frac {4 \, a \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (a + 3 \, b\right )} \sqrt {a} \arctan \left (\frac {{\left (8 \, a^{2} \cos \left (f x + e\right )^{5} - 8 \, {\left (a^{2} - a b\right )} \cos \left (f x + e\right )^{3} + {\left (a^{2} - 6 \, a b + b^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{4 \, {\left (2 \, a^{3} \cos \left (f x + e\right )^{4} - a^{2} b + a b^{2} - {\left (a^{3} - 3 \, a^{2} b\right )} \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}\right ) + 4 \, \sqrt {-b} b \arctan \left (-\frac {{\left ({\left (a - b\right )} \cos \left (f x + e\right )^{3} + 2 \, b \cos \left (f x + e\right )\right )} \sqrt {-b} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{2 \, {\left (a b \cos \left (f x + e\right )^{2} + b^{2}\right )} \sin \left (f x + e\right )}\right )}{8 \, f}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^2*(a+b*sec(f*x+e)^2)^(3/2),x, algorithm="fricas")

[Out]

[1/16*(8*a*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x + e)^2)*cos(f*x + e)*sin(f*x + e) + sqrt(-a)*(a + 3*b)*log(128*
a^4*cos(f*x + e)^8 - 256*(a^4 - a^3*b)*cos(f*x + e)^6 + 32*(5*a^4 - 14*a^3*b + 5*a^2*b^2)*cos(f*x + e)^4 + a^4
 - 28*a^3*b + 70*a^2*b^2 - 28*a*b^3 + b^4 - 32*(a^4 - 7*a^3*b + 7*a^2*b^2 - a*b^3)*cos(f*x + e)^2 - 8*(16*a^3*
cos(f*x + e)^7 - 24*(a^3 - a^2*b)*cos(f*x + e)^5 + 2*(5*a^3 - 14*a^2*b + 5*a*b^2)*cos(f*x + e)^3 - (a^3 - 7*a^
2*b + 7*a*b^2 - b^3)*cos(f*x + e))*sqrt(-a)*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x + e)^2)*sin(f*x + e)) + 4*b^(3
/2)*log(((a^2 - 6*a*b + b^2)*cos(f*x + e)^4 + 8*(a*b - b^2)*cos(f*x + e)^2 + 4*((a - b)*cos(f*x + e)^3 + 2*b*c
os(f*x + e))*sqrt(b)*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x + e)^2)*sin(f*x + e) + 8*b^2)/cos(f*x + e)^4))/f, 1/1
6*(8*a*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x + e)^2)*cos(f*x + e)*sin(f*x + e) + 8*sqrt(-b)*b*arctan(-1/2*((a -
b)*cos(f*x + e)^3 + 2*b*cos(f*x + e))*sqrt(-b)*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x + e)^2)/((a*b*cos(f*x + e)^
2 + b^2)*sin(f*x + e))) + sqrt(-a)*(a + 3*b)*log(128*a^4*cos(f*x + e)^8 - 256*(a^4 - a^3*b)*cos(f*x + e)^6 + 3
2*(5*a^4 - 14*a^3*b + 5*a^2*b^2)*cos(f*x + e)^4 + a^4 - 28*a^3*b + 70*a^2*b^2 - 28*a*b^3 + b^4 - 32*(a^4 - 7*a
^3*b + 7*a^2*b^2 - a*b^3)*cos(f*x + e)^2 - 8*(16*a^3*cos(f*x + e)^7 - 24*(a^3 - a^2*b)*cos(f*x + e)^5 + 2*(5*a
^3 - 14*a^2*b + 5*a*b^2)*cos(f*x + e)^3 - (a^3 - 7*a^2*b + 7*a*b^2 - b^3)*cos(f*x + e))*sqrt(-a)*sqrt((a*cos(f
*x + e)^2 + b)/cos(f*x + e)^2)*sin(f*x + e)))/f, 1/8*(4*a*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x + e)^2)*cos(f*x
+ e)*sin(f*x + e) - (a + 3*b)*sqrt(a)*arctan(1/4*(8*a^2*cos(f*x + e)^5 - 8*(a^2 - a*b)*cos(f*x + e)^3 + (a^2 -
 6*a*b + b^2)*cos(f*x + e))*sqrt(a)*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x + e)^2)/((2*a^3*cos(f*x + e)^4 - a^2*b
 + a*b^2 - (a^3 - 3*a^2*b)*cos(f*x + e)^2)*sin(f*x + e))) + 2*b^(3/2)*log(((a^2 - 6*a*b + b^2)*cos(f*x + e)^4
+ 8*(a*b - b^2)*cos(f*x + e)^2 + 4*((a - b)*cos(f*x + e)^3 + 2*b*cos(f*x + e))*sqrt(b)*sqrt((a*cos(f*x + e)^2
+ b)/cos(f*x + e)^2)*sin(f*x + e) + 8*b^2)/cos(f*x + e)^4))/f, 1/8*(4*a*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x +
e)^2)*cos(f*x + e)*sin(f*x + e) - (a + 3*b)*sqrt(a)*arctan(1/4*(8*a^2*cos(f*x + e)^5 - 8*(a^2 - a*b)*cos(f*x +
 e)^3 + (a^2 - 6*a*b + b^2)*cos(f*x + e))*sqrt(a)*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x + e)^2)/((2*a^3*cos(f*x
+ e)^4 - a^2*b + a*b^2 - (a^3 - 3*a^2*b)*cos(f*x + e)^2)*sin(f*x + e))) + 4*sqrt(-b)*b*arctan(-1/2*((a - b)*co
s(f*x + e)^3 + 2*b*cos(f*x + e))*sqrt(-b)*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x + e)^2)/((a*b*cos(f*x + e)^2 + b
^2)*sin(f*x + e))))/f]

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)**2*(a+b*sec(f*x+e)**2)**(3/2),x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 3004 deep

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^2*(a+b*sec(f*x+e)^2)^(3/2),x, algorithm="giac")

[Out]

integrate((b*sec(f*x + e)^2 + a)^(3/2)*cos(f*x + e)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\cos \left (e+f\,x\right )}^2\,{\left (a+\frac {b}{{\cos \left (e+f\,x\right )}^2}\right )}^{3/2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(e + f*x)^2*(a + b/cos(e + f*x)^2)^(3/2),x)

[Out]

int(cos(e + f*x)^2*(a + b/cos(e + f*x)^2)^(3/2), x)

________________________________________________________________________________________